package p4;

/**
 * @author krystal
 * @date 2022/11/10 9:07
 */
public class Demo2 {
    public static void main(String[] args) {
        int ret=factor(5);
        System.out.println("ret="+ret);
    }

    public static int factor(int n){
        if(n==1){
            return 1;
        }
        return  n * factor(n-1);
    }
}
